#ifndef _CAMERA_H
#define _CAMERA_H

#include <string>

#include "StringUtils.h"
#include "Logger.h"
#include "MathUtils.h"
#include "GameObject.h"
#include "Vector3.h"
#include "CameraType.h"
#include "GameInfo.h"
#include "ResourceManager.h"
#include "Input.h"
#include "Matrix3.h"
#include "Matrix4.h"
#include "Quaternion.h"

#ifdef GALLIUMENGINE_DLL 
#define GALLIUMENGINE_API __declspec( dllexport )
#else
#define GALLIUMENGINE_API __declspec( dllimport )
#endif

namespace GalliumEngine
{

	class Camera : public GameObject
	{
	private:
		std::string id;
		CameraType cameraType;

		Matrix4 projection;

		Vector3 rotationSpeed;
		Vector3 velocity;

		float nearPlane;
		float farPlane;
		float fov;
		float aspect;
		float left;
		float right;
		float top;
		float bottom;

		bool rotateMinusX;
		bool rotateX;
		bool rotateMinusY;
		bool rotateY;
		bool rotateMinusZ;
		bool rotateZ;

		bool translateMinusX;
		bool translateX;
		bool translateMinusY;
		bool translateY;
		bool translateMinusZ;
		bool translateZ;
	public:
		GALLIUMENGINE_API Camera(void);
		GALLIUMENGINE_API Camera(std::string _id);
		GALLIUMENGINE_API Camera(std::string _id, float _left, float _right, float _bottom, float _top, float _nearPlane, float _farPlane);
		GALLIUMENGINE_API ~Camera(void);
		GALLIUMENGINE_API std::string getId();

		GALLIUMENGINE_API virtual void initialize(float _left, float _right, float _bottom, float _top, float _nearPlane, float _farPlane);
		GALLIUMENGINE_API virtual void initialize(Vector3 _position, float _fov, float _aspect, float _nearPlane, float _farPlane);
		GALLIUMENGINE_API virtual void deinitialize();

		GALLIUMENGINE_API Matrix4 getProjectionMatrix();
		GALLIUMENGINE_API Matrix4 getViewMatrix();

		GALLIUMENGINE_API void lookAt(Vector3 eye, Vector3 center, Vector3 up);

		GALLIUMENGINE_API void update(float delta);
		GALLIUMENGINE_API void draw();
	};

}

#endif
